x86: fix Dom0 booting time regression
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 4 May 2010 11:42:21 +0000 (12:42 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 4 May 2010 11:42:21 +0000 (12:42 +0100)
commita03bd60cee72d1d7f025398c98130da7a011492e
treea485b55482f7215259a0636bd715c9f0deee3eb7
parentc499509ef2595a5daa8ef804168c94291e90ec48
x86: fix Dom0 booting time regression

Unfortunately the changes in c/s 21035 caused boot time to go up
significantly on certain large systems. To rectify this without going
back to the old behavior, introduce a new memory allocation flag so
that Dom0 allocations can exhaust non-DMA memory before starting to
consume DMA memory. For the latter, the behavior introduced in
aforementioned c/s gets retained, while for the former we can now even
try larger chunks first.

This builds on the fact that alloc_chunk() gets called with non-
increasing 'max_pages' arguments, end hence it can store locally the
allocation order last used (as larger order allocations can't succeed
during subsequent invocations if they failed once).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/domain_build.c
xen/common/page_alloc.c
xen/include/xen/mm.h